package top.eggcode.setup.config.dict;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import top.eggcode.plugins.dict.DictSource;
import top.eggcode.plugins.dict.Translator;

/**
 * Title:
 * Description: TODO
 * Date: 2021/6/24 13:14
 *
 * @author JiaQi Ding
 * @version 1.0
 */
@Configuration
public class TranslatorConfig {

    /**
     * 给翻译工具注入数据源
     *
     * @param dataSource 数据层
     */
    @Autowired(required = true)
    public void setDataSource(DictSource dataSource) {
        Translator.setDataSource(dataSource);
    }

}
